package com.icode.core.model.house;

import com.icode.core.model.AbstractEntity;
import com.icode.core.model.user.UserInfo;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-6-9
 * Time: 上午11:23
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "exchange_house_info")
public class ExchangeHouseInfo extends AbstractEntity {

    @ManyToOne
    @JoinColumn(name = "house_info_id")
    private HouseInfo houseInfo;
    @ManyToOne
    @JoinColumn(name = "house_week_id")
    private HouseWeek houseWeek;
    @ManyToOne
    @JoinColumn(name = "user_info_id")
    private UserInfo userInfo;

    public ExchangeHouseInfo() {
    }

    public ExchangeHouseInfo(HouseInfo houseInfo, HouseWeek houseWeek, UserInfo userInfo) {
        this.houseInfo = houseInfo;
        this.houseWeek = houseWeek;
        this.userInfo = userInfo;
    }

    public HouseInfo houseInfo() {
        return houseInfo;
    }

    public UserInfo userInfo() {
        return userInfo;
    }

    public HouseWeek houseWeek() {
        return houseWeek;
    }
}
